#include <QApplication>
#include "ElaApplication.h"
#include "BasicMessageTest.h"


int main(int argc, char *argv[])
{
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
    QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
    QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#else
    qputenv("QT_SCALE_FACTOR", "1.5");
#endif
#endif

    QApplication app(argc, argv);

    // 确保应用程序和主题系统正确初始化
    eApp->init();

    // 设置应用程序属性
    app.setApplicationName("ElaMessageButton Basic Test");
    app.setApplicationVersion("1.0.0");

    // 创建并显示窗口
    BasicMessageTest window;
    window.setWindowTitle("基础消息按钮示例");
    window.resize(400, 300);
    window.moveToCenter();
    window.show();

    return app.exec();
}